String.classPrototype.iterator

Instance of

Function

Return value

/*Iterator*/

Description

Returns an iterator that iterates over characters in the string, characters are represented as new strings.

Example

let str = "Harry";
let it = str.iterator()
while (!((let c <- it.next()) is Iterator.end))
    console.write(c, " ");

Expected output

H a r r y